home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / amiexpress / source / doors / acpcmd / acpcmd.c next >
Encoding:
C/C++ Source or Header  |  1992-12-26  |  2.7 KB  |  89 lines

  1. #include <exec/exec.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include "work:romconf/doorheader.h"
  5. #include <proto/exec.h>
  6. #include <string.h>
  7. #include "source:aztec/glue.h"
  8.  
  9. void creds(void);
  10. char cmd[200];
  11. char mypath[200];
  12. char tempname[400];
  13. char filename[200];
  14. char showname[200];
  15. int mynode;
  16. int Edited=0;
  17. void end(void);
  18. void LastCommand(void);
  19. #define sm sendmessage
  20. #define gu getuserstring
  21. #define pm prompt
  22. main(int argc,char *argv[])
  23. {
  24.    char command[100];
  25.    char nodenum[100];
  26.    int code;
  27.    register int i;
  28.    if(argc!=2)
  29.    {
  30.       printf(".------------------------------------------------------.\n",1);
  31.       printf("| Ami-Express AcpCmd Version 1.0 Written by ByteMaster |\n");
  32.       printf("|      /X Development Team - The Silent Achievers      |\n");
  33.       printf("`------------------------------------------------------'\n");
  34.       printf("\n");
  35.       printf(" This is a (XIM) for AmiExpress 3.00+\n");
  36.       printf("\n");
  37.       exit(0);
  38.    }
  39.    Register(argv[1][0]-'0');
  40.    creds();
  41.  
  42.    mynode=argv[1][0]-'0';
  43.    sm("",1);
  44.    sm("ACP COMMAND OPTIONS:",1);
  45.    sm("",1);
  46.    sm("Start Node      8Account Editing",1);
  47.    sm("Sysop Login     9Init Modem     ",1);
  48.    sm("Instant Login  10Node OffHook   ",1);
  49.    sm("AEShell        11Quiet Node     ",1);
  50.    sm("Toggle Chat    12Node Config    ",1);
  51.    sm("Exit Node      13Node Chat      ",1);
  52.    sm("Local Login    14Sav Window     ",1);
  53.    sm("  Reserve Node   15Set Nrams      ",1);
  54.    sm("",1);
  55.    sm("       16+CustomCommand  ",1);
  56.  
  57.    pm(">: ",command,5);
  58.    pm("Node >: ",nodenum,3);
  59.    if(atoi(command)>=0 && atoi(command)<=15)
  60.    AcpCommand("",atoi(command)+ACP_CONTROLCOMMAND,atoi(nodenum));
  61.    if(atoi(command)>15)
  62.    {
  63.      code=atoi(command)-15;
  64.      if(code<=15)
  65.      {
  66.            AcpCommand("",code+ACP_CUSTOMCOMMAND,atoi(nodenum));
  67.      }
  68.    }
  69.    ShutDown();
  70.    end();
  71. }
  72. void end(void)
  73. {
  74.   exit(0);
  75. }
  76. void LastCommand(void)
  77. {
  78.   
  79.   sm("",1); sm("",1);
  80. }
  81.  
  82. void creds(void)
  83. {
  84. sm("   .---------------------------------------------------------------------------.",1);
  85. sm("   |            Ami-Express AcpCmd Version 1.0 Written by ByteMaster           |",1);
  86. sm("   |                 /X Development Team - The Silent Achievers                |",1);
  87. sm("   `---------------------------------------------------------------------------'",1);
  88. sm("",1);
  89. }